package dto

// DictTypeListRequest 字典类型列表请求
type DictTypeListRequest struct {
	DictCode string `form:"dictCode"` // 字典编码（模糊查询）
	DictName string `form:"dictName"` // 字典名称（模糊查询）
	Status   *int8  `form:"status"`   // 状态
	Page     int    `form:"page" binding:"required,min=1"`
	PageSize int    `form:"pageSize" binding:"required,min=1,max=100"`
}

// CreateDictTypeRequest 创建字典类型请求
type CreateDictTypeRequest struct {
	DictCode string `json:"dictCode" binding:"required,max=50"`
	DictName string `json:"dictName" binding:"required,max=100"`
	Status   int8   `json:"status" binding:"oneof=0 1"`
	Remark   string `json:"remark" binding:"max=500"`
}

// UpdateDictTypeRequest 更新字典类型请求
type UpdateDictTypeRequest struct {
	DictCode string `json:"dictCode" binding:"required,max=50"`
	DictName string `json:"dictName" binding:"required,max=100"`
	Status   int8   `json:"status" binding:"oneof=0 1"`
	Remark   string `json:"remark" binding:"max=500"`
}

// DictDataListRequest 字典数据列表请求
type DictDataListRequest struct {
	DictCode string `form:"dictCode"` // 字典类型编码
	Status   *int8  `form:"status"`   // 状态
	Page     int    `form:"page" binding:"required,min=1"`
	PageSize int    `form:"pageSize" binding:"required,min=1,max=100"`
}

// GetDictDataByCodeRequest 根据字典编码获取数据请求
type GetDictDataByCodeRequest struct {
	DictCode string `form:"dictCode" binding:"required"`
}

// CreateDictDataRequest 创建字典数据请求
type CreateDictDataRequest struct {
	DictTypeID uint   `json:"dictTypeId" binding:"required"`
	DictCode   string `json:"dictCode" binding:"required,max=50"`
	DictLabel  string `json:"dictLabel" binding:"required,max=100"`
	DictValue  string `json:"dictValue" binding:"required,max=100"`
	DictSort   int    `json:"dictSort"`
	CssClass   string `json:"cssClass" binding:"max=100"`
	ListClass  string `json:"listClass" binding:"max=100"`
	IsDefault  int8   `json:"isDefault" binding:"oneof=0 1"`
	Status     int8   `json:"status" binding:"oneof=0 1"`
	Remark     string `json:"remark" binding:"max=500"`
}

// UpdateDictDataRequest 更新字典数据请求
type UpdateDictDataRequest struct {
	DictTypeID uint   `json:"dictTypeId" binding:"required"`
	DictCode   string `json:"dictCode" binding:"required,max=50"`
	DictLabel  string `json:"dictLabel" binding:"required,max=100"`
	DictValue  string `json:"dictValue" binding:"required,max=100"`
	DictSort   int    `json:"dictSort"`
	CssClass   string `json:"cssClass" binding:"max=100"`
	ListClass  string `json:"listClass" binding:"max=100"`
	IsDefault  int8   `json:"isDefault" binding:"oneof=0 1"`
	Status     int8   `json:"status" binding:"oneof=0 1"`
	Remark     string `json:"remark" binding:"max=500"`
}
